{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "%matplotlib widget\n",
    "\n",
    "import numpy as np\n",
    "\n",
    "from cion.gui import LiveHistogramWidgets, LiveLinesWidgets, LiveBarsWidgets"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "def iter_bars_data(nb=16):\n",
    "    #c = np.reshape((np.arange(ny)+1) * nb / (ny+1), [ny,1])\n",
    "    #r = np.random.uniform(nb/8, nb/16, [ny,1])\n",
    "    #y = np.zeros([ny, nb])\n",
    "\n",
    "    while True:\n",
    "      #  x = np.reshape(np.arange(nb), [1, nb])\n",
    "      #  v = np.exp(-np.square(x-c)/np.square(r))\n",
    "      #  y += v * np.random.normal(size=np.shape(y))\n",
    "        #y = np.clip(y, 0, None)\n",
    "        y = np.mean(np.array(exp.run_once()).reshape(32,exp.repeat),1)\n",
    "        yield y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "ea1f7918a9954b9fa309d50eba14f2a1",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Button(description='start', style=ButtonStyle())"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "b2af9fc066b64365bc27a46a6ef72994",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Button(description='clear', style=ButtonStyle())"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "d76ec96f5aa94d019e3a1bff28313edc",
       "version_major": 2,
       "version_minor": 0
      },
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24z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CAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIuJnkHvKensmIAAAAASUVORK5CYII=",
      "text/html": [
       "\n",
       "            <div style=\"display: inline-block;\">\n",
       "                <div class=\"jupyter-widgets widget-label\" style=\"text-align: center;\">\n",
       "                    Figure\n",
       "                </div>\n",
       "                <img src='' width=640.0/>\n",
       "            </div>\n",
       "        "
      ],
      "text/plain": [
       "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<cion.gui.live_widgets_bars.LiveBarsWidgets at 0x22a24138c10>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# !! important !! Be sure to assign the returned object to a variable!\n",
    "# The background scan thread works according to the lifecycle of this object.\n",
    "# The thread stops when this object is grabge collected.\n",
    "# If this object is not assigned to a variable:\n",
    "#     * It can be grabge collected, then the background thread can stop unexpectedly.\n",
    "#     * It can be stored by jupyter as an output, then the background thread can work endlessly. \n",
    "#       (If this expression executed at the last line of cell)\n",
    "def plot():\n",
    "    live_bars_widgets = LiveBarsWidgets(\n",
    "    producer=iter_bars_data(),  # here you can give either an iterator (generator) or a callable\n",
    "    frame_interval=1 / 32,  # the widget will try to update the ui with this interval (seconds)\n",
    "    )\n",
    "    return live_bars_widgets\n",
    "plot()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [],
   "source": [
    "def iter_historgram_data(n, dx=0.02):\n",
    "    y = np.zeros([n])\n",
    "\n",
    "    yield y\n",
    "    while True:\n",
    "        v = np.random.normal(0, 1, np.shape(y))\n",
    "        y = y + v * dx\n",
    "        yield y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "432173fa9ad94d7191e7c20b67d87d48",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Button(description='start', style=ButtonStyle())"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "78ce7fb59df6411195454073abc65071",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Button(description='clear', style=ButtonStyle())"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "f1fd8e8e3260467094375fbf011ec3da",
       "version_major": 2,
       "version_minor": 0
      },
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAIyUlEQVR4nO3WMQEAIAzAMMC/5+ECjiYKenbPzCwAADLO7wAAAN4ygAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwg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IMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIuJnkHvKensmIAAAAASUVORK5CYII=",
      "text/html": [
       "\n",
       "            <div style=\"display: inline-block;\">\n",
       "                <div class=\"jupyter-widgets widget-label\" style=\"text-align: center;\">\n",
       "                    Figure\n",
       "                </div>\n",
       "                <img src='' width=640.0/>\n",
       "            </div>\n",
       "        "
      ],
      "text/plain": [
       "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# !! important !! Be sure to assign the returned object to a variable!\n",
    "# The background scan thread works according to the lifecycle of this object.\n",
    "# The thread stops when this object is grabge collected.\n",
    "# If this object is not assigned to a variable:\n",
    "#     * It can be grabge collected, then the background thread can stop unexpectedly.\n",
    "#     * It can be stored by jupyter as an output, then the background thread can work endlessly. \n",
    "#       (If this expression executed at the last line of cell)\n",
    "live_histogram_widgets = LiveHistogramWidgets(\n",
    "    producer=iter_historgram_data(2),  # here you can give either an iterator (generator) or a callable\n",
    "    produce_interval=1 / 256,  # the widget will call the producer with this interval (seconds)\n",
    "    frame_interval=1 / 32,  # the widget will try to update the ui with this interval (seconds)\n",
    "    bins=20,  # the histograms will have these many bars\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [],
   "source": [
    "def iter_lines_data(n, dx=0.02):\n",
    "    x = 0\n",
    "    y = np.zeros([n])\n",
    "\n",
    "    yield x, y\n",
    "    while True:\n",
    "        x += dx\n",
    "        v = np.random.normal(0, 1, np.shape(y))\n",
    "        y = y + v * dx\n",
    "        yield x, y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [],
   "source": [
    "# !! important !! Be sure to assign the returned object to a variable!\n",
    "# The background scan thread works according to the lifecycle of this object.\n",
    "# The thread stops when this object is grabge collected.\n",
    "# If this object is not assigned to a variable:\n",
    "#     * It can be grabge collected, then the background thread can stop unexpectedly.\n",
    "#     * It can be stored by jupyter as an output, then the background thread can work endlessly. \n",
    "#       (If this expression executed at the last line of cell)\n",
    "live_lines_widgets = LiveLinesWidgets(\n",
    "    producer=iter_lines_data(2),  # here you can give either an iterator (generator) or a callable\n",
    "    produce_interval=1 / 256,  # the widget will call the producer with this interval (seconds)\n",
    "    frame_interval=1 / 32,  # the widget will try to update the ui with this interval (seconds)\n",
    "    win=10.0,  # only such a segment at the end of lines (measured by x value) will be shown\n",
    "    bins=20,  # the histograms will have these many bars. You can hide the histograms by giving None.\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "%matplotlib widget\n",
    "from cion.sequencer import *\n",
    "from cion.data import *\n",
    "\n",
    "import IPython.display as display\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "2\n",
      "Python Version: 3.9.7 on Windows\n",
      "\n",
      "Found: M4i.6622-x8 sn 17629\n",
      "D:\\Data\\2022\\202211\\20221111\\\n",
      "1 channels are enabled.\n"
     ]
    }
   ],
   "source": [
    "#include sequencies\n",
    "execfile(\"cion/data.py\")\n",
    "execfile(\"cion/sequencer.py\")\n",
    "# AdvanceGate用法见最下面\n",
    "Global_Setting.set_debug_mode(False)\n",
    "execfile('ZTESTER_Load_ion.py')\n",
    "ion_number = 1\n",
    "exp = Experiment(ion_number=ion_number, chapter_dict=Exp_chapter_dict, port=\"COM5\", ip_address='192.168.2.30::INSTR1::INSTR')\n",
    "exp.awg_switch=False\n",
    "seq = exp.last_sequence\n",
    "print(exp.data.path_prefix)\n",
    "exp.awg_interface.enable_channels([0],soft_flag=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "621291b1ab0a4875a8989ed833465a9a",
       "version_major": 2,
       "version_minor": 0
      },
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA+gAAAGQCAYAAAA9TUphAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAApEUlEQVR4nO3deZRU5Zk/8Ke66QYbGpC1xbCJS2Q0aNyCJi4zKo57Yhxn4ppRjBESHVxyNAtn1BGXuI9LoolLxuWMYyQqJjNGBBnjBirjiBuiYlTobkmr6Nhd3XV/f/CzZlpMotL0fbvr8zmHc6rvvXXruX2Ap773feutQpZlWQAAAAC5qsq7AAAAAEBABwAAgCQI6AAAAJAAAR0AAAASIKADAABAAgR0AAAASICADgAAAAkQ0AEAACABAjoAAAAkQEAHAACABAjoAAAAkAABHQAAABIgoAMAAEACBHQAAABIgIAOAAAACRDQAQAAIAF98i4gLx0dHVEsFvMuo8epra2Nqir3dQAAALpaxQX0LMtixYoV0dLSkncpPVJVVVWMHz8+amtr8y4FAACgVylkWZblXUR3evPNN6OlpSVGjBgRdXV1USgU8i6pxyiVSvHGG29ETU1NjBkzxu8OAACgC1XUCHpHR0c5nA8dOjTvcnqk4cOHxxtvvBHt7e1RU1OTdzkAAAC9RkV9mPjDz5zX1dXlXEnP9eHU9o6OjpwrAQAA6F0qagT9Qx9OzS6VSvHWW2/lVsfQoUN73IJrprUDAACsHxUZ0D/01ltvxYgRI3J7/cbGxhg+fHhurw8AAEA6etbwbQXLsiyOP/74GDJkSBQKhXjqqafyLgkAAIAuVNEj6D3Jb37zm7jhhhti3rx5sckmm8SwYcPyLgkAAIAuJKD3EC+99FJstNFGsfPOO+ddCgAAAOuBgP4RS5YsWS+j083NzTFx4sTP9NxjjjkmbrzxxohYs0jb2LFjY9y4cbHVVltFRMQvfvGLqKmpiW9/+9tx1llnlRdye/PNN+O4446LuXPnRkNDQ/zTP/1TnHnmmXHyySfHySefHBERF198cVx//fWxbNmyGDJkSBxwwAFxwQUXxIABA9b9ogEAAPjEBPSPGDZsWHILt1122WUxYcKE+OlPfxqPP/54VFdXx6GHHho33nhjHHvssfHYY4/FwoUL4/jjj48xY8bE1KlTIyLiqKOOiubm5pg3b17U1NTEjBkzorGxsdO5q6qq4vLLL4/x48fHsmXL4sQTT4zTTz89rrrqqjwuFQAAoGIJ6D3AoEGDor6+Pqqrq6OhoaG8ffTo0XHJJZdEoVCILbbYIp5++um45JJLYurUqfHcc8/Fb3/723j88cdj++23j4iI6667LjbbbLNO5/5wJD0iYty4cXHOOefECSecIKADAAB0M6u492Bf+tKXOn0v+eTJk+PFF1+Mjo6OeP7556NPnz7xxS9+sbx/0003jQ033LDTOX7729/GX/3VX8XGG28c9fX1ceSRR8Zbb70V77//frddBwAAAAJ6RXvllVdi//33jy984Qtxxx13xKJFi+LKK6+MiIi2tracqwMAAKgsprh/RHNzc48576OPPtrp50ceeSQ222yzqK6uji222CLa29vjySefjO222y4iIpYuXRp/+MMfyscvWrQoSqVSXHTRRVFVteZezb/+6792eZ0AAAD8eQL6R3zWldbzsHz58pgxY0Z861vfiieeeCKuuOKKuOiiiyIi4vOf/3zsueeecfzxx8fVV18dNTU1ccopp8QGG2xQnha/6aabRrFYjCuuuCIOOOCAeOihh+Kaa67J85IAAAAqlinuPdhRRx0V//M//xM77rhjTJs2LU466aQ4/vjjy/tvuummGDlyZOy6667x1a9+NaZOnRr19fXRr1+/iIiYNGlSXHzxxXH++efHVlttFTfffHPMmjUrr8sBAACoaIUsy7K8i+guH3zwQbz88ssxfvz46NevXzQ1NcWIESNyq6exsfEzf6Xb7rvvHttss01ceumln/g5v//972P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AAASIKADAABAAgR0AAAASICADgAAAAkQ0AEAACABAjoAAAAkQEAHAACABAjoAAAAkAABHQAAABIgoAMAAEACBHQAAABIgIAOAAAACRDQAQAAIAECOgAAACRAQAcAAIAECOgAAACQAAEdAAAAEiCgAwAAQAIEdAAAAEiAgA4AAAAJENABAAAgAQI6AAAAJEBABwAAgAQI6AAAAJAAAR0AAAASIKADAABAAgR0AAAASICADgAAAAkQ0AEAACABAjoAAAAkQEAHAACABAjoAAAAkAABHQAAABIgoAMAAEACBHQAAABIgIAOAAAACRDQAQAAIAECOgAAACRAQAcAAIAECOgAAACQAAEdAAAAEiCgAwAAQAIEdAAAAEiAgA4AAAAJENABAAAgAQI6AAAAJEBABwAAgAQI6AAAAJAAAR0AAAASIKADAABAAgR0AAAASICADgAAAAkQ0AEAACABAjoAAAAkQEAHAACABAjoAAAAkAABHQAAABLQZQF95cqVceSRR8aoUaOiT58+UV1d3elPbzVv3rwoFAp/9M8ee+yRd4mQnKampvj2t78dY8aMib59+0ZDQ0NMmTIlHnrooYiIKBQKMXv27HyLBID/z/s9oLv06aoTHXPMMbF8+fL44Q9/GBtttFEUCoXPfK4rr7wyLrzwwlixYkVMmjQprrjiithxxx27qtQutfPOO8ebb7651va77rorTjjhhDjxxBNzqArSdsghh0RbW1vceOONsckmm8TKlSvj/vvvj7feeusTn6OtrS1qa2vXY5UAsMb6er+nlwFrybrIgAEDsieffHKdz3PbbbdltbW12c9//vPsmWeeyaZOnZoNHjw4W7ly5boX2U2WLFmS1dfXZ9///vfL255++ulsn332yerq6rKIWOtPY2NjjhVD9/nDH/6QRUQ2b968j90/duzYTv82xo4dm2VZls2cOTObNGlSdu2112bjxo3LCoVClmVZ9uqrr2YHHnhg1r9//6y+vj479NBDsxUrVpTP9+Hzbrrppmzs2LHZwIEDs8MOOyx75513yse888472Te+8Y2srq4ua2hoyC6++OJst912y0466aT19nuA1CxZskRvgk/hT73f69+/fzZixIjsiCOOyJqamsr7d9ttt2zatGnZSSedlA0dOjTbfffdsyzLsnnz5mU77LBDVltbmzU0NGTf+973smKx2O3XBClqbGysqP7UZVPcR48eHVmWrfN5Lr744pg6dWp885vfjIkTJ8Y111wTdXV18fOf/7wLqlz/Wlpa4qCDDordd989zj777PK2v/zLv4xtt9027rvvvpwrhHwNGDAgBgwYELNnz47W1ta19j/++OMREXH99dfHm2++Wf45ImLp0qVxxx13xC9/+ct46qmnolQqxUEHHRSrVq2K+fPnx3333RfLli2Lww47rNM5X3rppZg9e3bcc889cc8998T8+fPjvPPOK++fMWNGPPTQQ3HXXXfFfffdFwsWLIgnnnhiPf0GAOjp/tz7vYULF8ZvfvObWLlyZfzN3/xNp+feeOONUVtbGw899FBcc8018frrr8e+++4bO+ywQyxevDiuvvrq+NnPfhbnnHNOHpcG5K2rkv6///u/Z3vvvXf28ssvf+ZztLa2ZtXV1dmdd97ZaftRRx2VHXjggetWYDfo6OjI/vqv/zrbcsstO43OnX322dnee++dZdnH3wGKXn4XCD7q3/7t37INN9ww69evX7bzzjtnZ5xxRrZ48eLy/ohY6/+BmTNnZjU1NZ3+rfzHf/xHVl1dnS1fvry87ZlnnskiInvsscfKz6urq+v0b/K0007LdtpppyzL1oye19TUZLfffnt5f0tLS1ZXV2cEnYpiBB0+mU/yfu9Dr732WhYR2fPPP59l2ZoR9G233bbTMWeeeWa2xRZbZKVSqbztyiuvzAYMGJB1dHSsxyuBnqHSRtC77DPohx12WLz//vsxYcKEqKuri5qamk77V61a9WfP0dzcHB0dHTFy5MhO20eOHBnPPffcxz6ntbV1rVG41tbW6Nu376e8gnU3c+bM+N3vfhcPPPBAZFkW77zzTkRELFy4MB544IEYMGBAl8wygJ7ukEMOif322y8WLFgQjzzySPz617+OCy64IK677ro45phj/ujzxo4dG8OHDy///Oyzz8bo0aNj9OjR5W0TJ06MwYMHx7PPPhs77LBDRESMGzcu6uvry8dstNFG0djYGBERy5Yti2Kx2Gmdi0GDBsUWW2zRVZcLQC9y5plnxsMPPxyPPfZYp96yePHi8vu9j3rppZdi8803j4iI7bbbrtO+Z599NiZPntxp/aZddtklVq9eHb///e9jzJgx6+lKoOd69913c8l7n9TAgQM/83O7LKBfeumlXXWqT2XWrFnxj//4j7m89h/zxS9+8WO3F4vFbq4E0tWvX7/Ya6+9Yq+99oof/vCHcdxxx8XMmTP/ZEDv37//Z3qtj94wLBQKUSqVPtO5AKhct912W/z4xz+OOXPmxGabbdZp3+rVq+OAAw6I888/f63nbbTRRuXHn7WXAf9rwoQJeZfwJ63LoGyXBfSjjz56nc8xbNiwqK6ujpUrV3bavnLlymhoaPjY55xxxhkxY8aMTtu6ewT9v/7rv2LKlClxxhlnxHe/+9219p911llx1113xSOPPBItLS3J/4WCPEycOLH81Wo1NTXR0dHxZ5+z5ZZbxmuvvRavvfZaeRR9yZIl0dLSEhMnTvxEr7vJJptETU1NPP744+VRirfffjteeOGF2HXXXT/bxQDQ6zz11FNx7LHHxnnnnRdTpkxZa/8Xv/jFuOOOO2LcuHHRp88nf4u95ZZbxh133BFZlpVH0R966KGor6+Pz33uc11WP/QmL730UgwbNizvMtaLLgvoEREdHR0xe/bsePbZZyMi4i/+4i/iwAMP/MTfg15bWxvbbbdd3H///XHwwQdHRESpVIr7778/pk+f/rHP6du3b67TG5qbm+OII46I3XffPY477rh4//33O+2vrq6OGTNmxE033RTf+ta3YurUqTlVCml466234tBDD42///u/jy984QtRX18fCxcujAsuuCAOOuigiFgzJf3++++PXXbZJfr27Rsbbrjhx55rzz33jK233joOP/zwuPTSS6O9vT1OPPHE2G233WL77bf/RPXU19fH0UcfHaeddloMGTIkRowYETNnzoyqqqp1+rpIAHqP5ubmOPjgg2P33XePI444IlasWNFpf3V1dUybNi2uvfba+Lu/+7s4/fTTY8iQIbF06dK47bbb4rrrrvuj74dPPPHEuPTSS+M73/lOTJ8+PZ5//vmYOXNmzJgxI6qqumw9Z+hV6uvr12kaecq6LKAvXbo09t1333j99dfLn92cNWtWjB49OubMmfOJR41nzJgRRx99dGy//fax4447xqWXXhrvvfdefPOb3+yqUrvUnDlz4tVXX41XX3210/SlD40dOzZeeeWVeOihh+J73/veWit5QqUZMGBA7LTTTnHJJZfESy+9FMViMUaPHh1Tp06NM888MyIiLrroopgxY0Zce+21sfHGG8crr7zysecqFArxq1/9Kr7zne/ErrvuGlVVVbHPPvvEFVdc8alquvjii+OEE06I/fffPwYOHBinn356vPbaa9GvX791vVwAeoFP+35v7733jtbW1hg7dmzss88+fzJob7zxxnHvvffGaaedFpMmTYohQ4bEscceGz/4wQ/W5yUBiSpkXbRq2b777htZlsXNN98cQ4YMiYg1I2VHHHFEVFVVxZw5cz7xuf75n/85LrzwwlixYkVss802cfnll8dOO+3UFWXmrqmpKUaMGLHW9sbGxk6LXwH5ee+992LjjTeOiy66KI499ti8y4Fu8eyzz6710RC9CYC8fVx+6s39qctG0OfPnx+PPPJIOZxHRAwdOjTOO++82GWXXT7VuaZPn/5Hp7QDdLUnn3wynnvuudhxxx3j7bffjrPOOisiojzlHgAAukOXBfS+ffvGu+++u9b21atXR21tbVe9DMB68eMf/zief/758loYCxYs6LWLjwAAkKYuC+j7779/HH/88fGzn/2s/H3Cjz76aJxwwglx4IEHdtXLAHS5bbfdNhYtWpR3GQAAVLguWxry8ssvjwkTJsTkyZOjX79+0a9fv9h5551j0003ze070gEAAKCn6LIR9MGDB8evfvWrWLp0aflr1rbccsvYdNNNu+olAAAAoNdap4A+Y8aMOPvss6N///4xY8aMtfY/8MAD5ccXX3zxurwUAAAA9GrrFNCffPLJKBaL5cd/TKFQWJeXAQAAgF5vnQL6/x0h/7+PAQAAgE+nyxaJAwAAAD47AR0AAAASIKADAABAAgR0AAAASICADgAAAAkQ0AEAACABAjoAAAAkQEAHAACABAjoAAAAkAABHQAAABIgoAMAAEACBHQAAABIgIAOAAAACRDQAQAAIAECOgAAACRAQAcAAIAECOgAAACQAAEdAAAAEiCgAwAAQAIEdAAAAEiAgA4AAAAJENABAAAgAQI6AAAAJEBABwAAgAQI6AAAAJAAAR0AAAASIKADAABAAgR0AAAASICADgA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AYMGBCHHHJIrFy5stMxy5cvj/322y/q6upixIgRcdppp0V7e3t5/5tvvhnf+MY3YvPNN4+qqqo4+eSTu+PyuoyAnoN77703lixZEieccEJERIwbNy6mTJkSjY2NOVcGQG/w3nvvxaRJk+LKK6/82P0XXHBBXH755XHNNdfEo48+Gv37948pU6bEBx98UD7m8MMPj2eeeSbuu+++uOeee+LBBx+M448/vry/o6MjNthgg/jud78be+6553q/JgB6tvnz58e0adPikUceifvuuy+KxWLsvffe8d5775WP+Yd/+Ie4++674/bbb4/58+fHG2+8EV/72tfK+zs6OmK//faLtra2+N3vfhc33nhj3HDDDfGjH/2ofExra2sMHz48fvCDH8SkSZO69Rq7REa323HHHbNp06ZlWZZlEZHdcccd2ahRo7JZs2blXBkAvU1EZHfeeWf551KplDU0NGQXXnhheVtLS0vWt2/f7NZbb82yLMuWLFmSRUT2+OOPl4/59a9/nRUKhez1119f6zWOPvro7KCDDlpv1wBA79PY2JhFRDZ//vwsy9b0opqamuz2228vH/Pss89mEZE9/PDDWZZl2b333ptVVVVlK1asKB9z9dVXZwMHDsxaW1vXeo3ddtstO+mkk9bvhXQxI+jdrK2tLRYtWtRptKGqqir23HPPePjhh3OsDIBK8PLLL8eKFSs69aFBgwbFTjvtVO5DDz/8cAwePDi233778jF77rlnVFVVxaOPPtrtNQPQ+7z99tsRETFkyJCIiFi0aFEUi8VO/enzn/98jBkzplN/2nrrrWPkyJHlY6ZMmRLvvPNOPPPMM91Y/fojoHez5ubm6Ojo6PSXKiJi5MiRsWLFipyqAqBSfNhr/lQfWrFiRYwYMaLT/j59+sSQIUP0KgDWWalUipNPPjl22WWX2GqrrSJiTe+pra2NwYMHdzr2o/3p4/rXh/t6gz55FwAAAEDlmDZtWvz3f/93/Od//mfepSTHCHo3GzZsWFRXV6+1GuHKlSujoaEhp6oAqBQf9po/1YcaGhrWWri0vb09Vq1apVcBsE6mT58e99xzTzzwwAPxuc99rry9oaEh2traoqWlpdPxH+1PH9e/PtzXGwjo3ay2tja22267uP/++8vbSqVS3H///TF58uQcKwOgEowfPz4aGho69aF33nknHn300XIfmjx5crS0tMSiRYvKx8ydOzdKpVLstNNO3V4zAD1flmUxffr0uPPOO2Pu3Lkxfvz4Tvu32267qKmp6dSfnn/++Vi+fHmn/vT00093uol83333xcCBA2PixIndcyHrmSnuOTjxxBNj6tSpMXz48IiIuPDCC+Ptt9+OvfbaK+fKAOgNVq9eHUuXLi3//PLLL8dTTz0VQ4YMiTFjxsTJJ58c55xzTmy22WYxfvz4+OEPfxijRo0qf5f5lltuGfvss09MnTo1rrnmmigWizF9+vT427/92xg1alT5vEuWLIm2trZYtWpVvPvuu/HUU09FRMQ222zTjVcLQE8wbdq0uOWWW+JXv/pV1NfXlz8zPmjQoNhggw1i0KBBceyxx8aMGTNiyJAhMXDgwPjOd74TkydPji996UsREbH33nvHxIkT48gjj4wLLrggVqxYET/4wQ9i2rRp0bdv3/JrfdiPVq9eHU1NTfHUU09FbW1tjwjxhSzLsryLqDTz5s2LPfbYY63tRx99dNxwww3dXxAAvcqf6zNZlsXMmTPjpz/9abS0tMSXv/zluOqqq2LzzTcvH7tq1aqYPn163H333VFVVRWHHHJIXH755TFgwIDyMePGjYtXX311rdfx1gKAjyoUCh+7/frrr49jjjkmIiI++OCDOOWUU+LWW2+N1tbWmDJlSlx11VWdpq+/+uqr8e1vfzvmzZsX/fv3j6OPPjrOO++86NPnf8eeP+61xo4dG6+88kqXXtP6IKADAABAAnwGHQAAABIgoAMAAEACBHQAAABIgIAOAAAACRDQAQAAIAECOgAAACRAQAcAAIAECOgAAACQAAEdACrEvHnzolAoREtLS96lAAAfo5BlWZZ3EQBA19t9991jm222iUsvvTQiItra2mLVqlUxcuTIKBQK+RYHAKylT94FAADdo7a2NhoaGvIuAwD4I0xxB4Be6Jhjjon58+fHZZddFoVCIQqFQtxwww2dprjfcMMNMXjw4Ljnnntiiy22iLq6uvj6178e77//ftx4440xbty42HDDDeO73/1udHR0lM/d2toap556amy88cbRv3//2GmnnWLevHn5XCgA9CJG0AGgF7rsssvihRdeiK222irOOuusiIh45pln1jru/fffj8svvzxuu+22ePfdd+NrX/tafPWrX43BgwfHvffeG8uWLYtDDjkkdtlllzjssMMiImL69OmxZMmSuO2222LUqFFx5513xj777BNPP/10bLbZZt16nQDQmwjoANALDRo0KGpra6Ourq48rf25555b67hisRhXX311TJgwISIivv71r8cvfvGLWLlyZQwYMCAmTpwYe+yxRzzwwANx2GGHxfLly+P666+P5cuXx6hRoyIi4tRTT43f/OY3cf3118e5557bfRcJAL2MgA4AFayurq4cziMiRo4cGePGjYsBAwZ02tbY2BgREU8//XR0dHTE5ptv3uk8ra2tMXTo0O4pGgB6KQEdACpYTU1Np58LhcLHbiuVShERsXr16qiuro5FixZFdXV1p+P+b6gHAD49AR0Aeqna2tpOi7t1hW233TY6OjqisbExvvKVr3TpuQGg0lnFHQB6qXHjxsWjjz4ar7zySjQ3N5dHwdfF5ptvHocffngcddRR8ctf/jJefvnleOyxx2LWrFkxZ86cLqgaACqXgA4AvdSpp54a1dXVMXHixBg+fHgsX768S857/fXXx1FHHRWnnHJKbLHFFnHwwQfH448/HmPGjOmS8wNApSpkWZblXQQAAABUOiPoAAAAkAABHQAAABIgoAMAAEACBHQAAABIgIAOAAAACRDQAQAAIAECOgAAACRAQAcAAIAECOgAAACQAAEdAAAAEiCgAwAAQAIEdAAAAEiAgA4AAAAJENABAAAgAQI6AAAAJEBABwAAgAQI6AAAAJCA/wcM+bU3jBE1+QAAAABJRU5ErkJggg==",
      "text/html": [
       "\n",
       "            <div style=\"display: inline-block;\">\n",
       "                <div class=\"jupyter-widgets widget-label\" style=\"text-align: center;\">\n",
       "                    Figure\n",
       "                </div>\n",
       "                <img src='' width=1000.0/>\n",
       "            </div>\n",
       "        "
      ],
      "text/plain": [
       "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "doppler_cooling = exp.new_sequence()\n",
    "doppler_cooling.set_sequence(\n",
    "    Zero(1).on(all),\n",
    "    Strong(1000).on(all),\n",
    "    Zero(1000).on(all))\n",
    "exp.print_sequence(sequence=doppler_cooling, )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "14da0aadfaa3436abf189b44825f0235",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Button(description='start', style=ButtonStyle())"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "498dc9c1805c42ffacd642917408a57e",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Button(description='clear', style=ButtonStyle())"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "54abba199fc7474981500b89b82f6437",
       "version_major": 2,
       "version_minor": 0
      },
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAIyUlEQVR4nO3WMQEAIAzAMMC/5+ECjiYKenbPzCwAADLO7wAAAN4ygAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAI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AIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgDCAAQYwABAGIuJnkHvKensmIAAAAASUVORK5CYII=",
      "text/html": [
       "\n",
       "            <div style=\"display: inline-block;\">\n",
       "                <div class=\"jupyter-widgets widget-label\" style=\"text-align: center;\">\n",
       "                    Figure\n",
       "                </div>\n",
       "                <img src='' width=640.0/>\n",
       "            </div>\n",
       "        "
      ],
      "text/plain": [
       "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<cion.gui.live_widgets_bars.LiveBarsWidgets at 0x1c2ecd2dc10>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "exp.repeat=100\n",
    "exp.threshold=2\n",
    "exp.sweep_histogram(fps=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "toc-autonumbering": false,
  "toc-showcode": true,
  "toc-showmarkdowntxt": true
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
